package com.lbc.bean.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author xyl
 * @date 2021-03-18 16:26
 */
@Data
public class DonateProjectDTO {

    @ApiModelProperty("编辑时携带主键id")
    private Integer donateProjectId;

    @NotBlank(message = "大图不能为空!")
    @ApiModelProperty(value = "大图地址", required = true)
    private String mainPic;

    @NotBlank(message = "标题不能为空!")
    @ApiModelProperty(value = "标题", required = true)
    private String title;

    @NotBlank(message = "捐赠对象不能为空!")
    @ApiModelProperty(value = "捐赠对象", required = true)
    private String donateObject;

    @NotNull(message = "总金额不能为空!")
    @ApiModelProperty(value = "总金额", required = true)
    private Float goalMoney;

    @JsonFormat(pattern = "yyyy/MM/dd")
    @NotNull(message = "截止时间不能为空!")
    @ApiModelProperty(value = "截止时间 ,yyyy/MM/dd", required = true)
    private Date deadline;

    @NotBlank(message = "描述不能为空!")
    @ApiModelProperty(value = "描述", required = true)
    private String description;

    @NotBlank(message = "详情不能为空!")
    @ApiModelProperty(value = "详情", required = true)
    private String detail;

}
